<%--
  Created by IntelliJ IDEA.
  User: asd73
  Date: 2017/9/22
  Time: 14:45
  To change this template use File | Settings | File Templates.
--%>
<%--01-jq索引值--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <script type="text/javascript" src="../js/jquery.js"></script>
    <title>Title</title>
    <script type="text/javascript">
        $(function (e) {
            $('div').click(function () {
                alert($(this).index());//点击哪个div显示该div在其父级元素的索引值
            });

        });
    </script>
</head>
<body>
    <div>我是div</div>
    <div>我是div</div>
    <div>我是div</div>
    <div>我是div</div>
    <div>我是div</div>
</body>
</html>
